﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<RuiJing.Web.Areas.Manage.Models.ManagerModels.AdminEditModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	编辑管理员
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div>
<% Html.DisableClientValidation(); %>
<% Html.BeginForm(new { id = "editform" }, new { ID = Model.ID.Value.ToString("N") }); %>
    <fieldset class="editset">
        <legend>编辑管理员</legend>
        <%=Html.ActionLink(">>返回", "index", null , new { @class="a2" })%>
        <%=Html.ValidationSummary() %>
        <ul class="editpanel">
            <li class="edititem">
                <label class="label" for="LoginName">登录名：</label>
                <div class="edititemcontent">
                    <%=Html.TextBoxFor(p => p.LoginName, new { validate = "{required:true,minlength:4,maxlength:20,messages:{required:'*',minlength:'*',maxlength:'*'}}" })%>
                    4-20个字符
                </div>
            </li>
            <li class="edititem">
                <label class="label" for="Password">登录密码：</label>
                <div class="edititemcontent">
                    <input type="password" id="Password" name="Password"  validate="{minlength:6,maxlength:12,messages:{minlength:'*',maxlength:'*'}}" />
                    4-20个字符(不填不更改)
                </div>
            </li>
            <li class="edititem">
                <label class="label" for="ConfirmPwd">确认密码：</label>
                <div class="edititemcontent">
                    <input type="password" id="ConfirmPwd" name="ConfirmPwd"  validate="{equalTo:'#Password',messages:{equalTo:'两次密码输入不一至'}}" />
                    再次输入
                </div>
            </li>
            <li class="edititem">
                <label class="label" for="CheckPwd">验证密码：</label>
                <div class="edititemcontent">
                    <input type="password" id="CheckPwd" name="CheckPwd"  validate="{required:true,messages:{required:'*'}}" />
                    您的登录密码
                </div>
            </li>
            <li class="edititem btnpanel">
                <input type="submit" value="保存" onclick="return confirm('确认提交吗?')" />
            </li>
        </ul>
    </fieldset>
<% Html.EndForm(); %>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StypeAndScript" runat="server">
    <script src='<%=Url.Content("/Scripts/jquery.metadata.js") %>' type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#editform").validate();
        });
    </script>
</asp:Content>